"use client"
import Link from "next/link";
import {useRouter} from "next/navigation";

export default function Page() {
    const router = useRouter()

    const handleToLogin = ()=>{
        // 其他业务逻辑代码处理完之后跳转
        router.push('/login')
    }
    return (
        <div>
            {/*顶部导航部份*/}
            <header>
                <nav>
                    <li>
                        <Link href={'/'}>首页</Link>
                    </li>
                    <button onClick={handleToLogin}>

                    </button>
                </nav>
            </header>

            {/*  主体部份  */}
            <main>
                <div>Hello World!</div>
            </main>

            {/*  页脚部份  */}
            <footer>
                <div>&copy;{new Date().getFullYear()} 黄运厚</div>
            </footer>
        </div>
    )
}
